package com.xiaoai.comparetor;//创建一个类

class PersonComparator {

    //声明成员变量
    private String name;
    private int age;

    //声明构造器
    public PersonComparator(String name, int age) {
        super();
        this.name = name;
        this.age = age;
    }

    //创建getter 和 setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
     this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}

